class Person:
    def __init__(self,name,age,height):
        self.name=name
        self.age=age
        self.height=height
    def run(self):
        print('run')
    def eat(self):
        print('eat')
    def __str__(self):#重写str
        return self.name
class Dog:
    def __init__(self,name,color):
        self.name=name
        self.color=color
    def bark(self):
        print('bark')
    def wag(self):
        print('wag')

xiao_ming=Person('xiaoming',18,185)
xiao_ming.run()
xiao_hong=Person('xiaohong',18,180)
xiao_hong.eat()
print(xiao_ming is xiao_hong)#is 判断是不是同一个对象
print(xiao_ming)